using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace NewRen.Models
{
    public class Product
    {
        public int ID { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        [Index]
        [StringLength(450)]
        public string ProductName { get; set; }

        /// <summary>
        /// //描述
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 价格
        /// </summary>
        public decimal Price { get; set; }

        /// <summary>
        /// 兑换所需积分
        /// </summary>
        public int Integration { get; set; }

        /// <summary>
        /// 增加时间
        /// </summary>
        [Index]
        public DateTime Time { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        [Index]
        public DateTime Begin { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        [Index]
        public DateTime End { get; set; }

        /// <summary>
        /// 是否展示
        /// </summary>
        public bool IsShow { get; set; }

        /// <summary>
        /// 商家ID
        /// </summary>
        [ForeignKey("Business")]
        public int BusinessID { set; get; }

        public virtual Business Business { set; get; }

        /// <summary>
        /// 是否通过检测
        /// </summary>

        public bool IsPass { set; get; }
        
        [StringLength(100)]
        [Index]
        public string ProductType { set; get; }
    }
}
